package archer.application.elastic.mock.core.api.internal.system;

import archer.application.elastic.mock.core.service.system.StaffService;
import archer.framework.common.controller.BaseController;
import archer.framework.protocol.result.ExecuteResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author christ
 * @date 2016/6/7
 */
@RestController
@RequestMapping("/api/v*/internal/system/staff")
@Transactional
public class StaffApi extends BaseController {

    @Autowired
    StaffService staffService;

    @RequestMapping("login")
    public ExecuteResult login(String loginName, String password) {

        return staffService.login(loginName, password);
    }

}
